<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="AddClientBranch.aspx.vb" Inherits="GTSWeb_AddClientBranch" title="GTS Frieght Management System"  MaintainScrollPositionOnPostback="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
    <h3>Add Client Branch</h3><table width="60%">
        <tr>
            <td style="width: 123px; height: 26px; text-align: right;">
                &nbsp;Branch Name:</td>
            <td style="width: 246px; height: 26px">
                &nbsp;<asp:TextBox ID="txtBranchName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBranchName"
                    ErrorMessage="Required: Branch Name">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Contact Name:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtContactName"
                    ErrorMessage="Required: Contact Name">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Phone Number:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtPhone"
                    ErrorMessage="Required: Phone Number">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Fax:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtFax"
                    ErrorMessage="Required: Fax">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Email:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtEmail"
                    ErrorMessage="Required: Email Address">*</asp:RequiredFieldValidator>&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Street Address:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtAddress"
                    ErrorMessage="Required: Street Address">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;City:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtCity"
                    ErrorMessage="Required: City">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                Province:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtState" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtState"
                    ErrorMessage="Required: State">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Country:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtCountry" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtCountry"
                    ErrorMessage="Required: Country">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 123px; text-align: right;">
                &nbsp;Postal Code:</td>
            <td style="width: 246px">
                &nbsp;<asp:TextBox ID="txtPostalCode" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtPostalCode"
                    ErrorMessage="Required: Postal Code">*</asp:RequiredFieldValidator>
                </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right">
                <asp:Button ID="btnAddClientBranch" runat="server" Text="ADD" Width="203px" />
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: left">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="OrangeRed" />
            </td>
        </tr>
    </table>
    <strong>
        <br />
        You currently have following branches</strong><br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ClientBranchID" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" PageSize="4" Width="60%">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:BoundField DataField="BranchName" HeaderText="BranchName" SortExpression="BranchName" />
        </Columns>
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <EditRowStyle BackColor="#999999" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="CreateClientBranch"
        OldValuesParameterFormatString="original_{0}" SelectMethod="getClientBranch"
        TypeName="GTSSystem.BLL.ClientBranch" UpdateMethod="UpdateClientBranch">
        <UpdateParameters>
            <asp:Parameter Name="ClientBranchId" Type="Int32" />
            <asp:Parameter Name="ClientId" Type="Int32" />
            <asp:Parameter Name="StatusId" Type="Int32" />
            <asp:Parameter Name="ContactInfoId" Type="Int32" />
            <asp:Parameter Name="locationId" Type="Int32" />
            <asp:Parameter Name="BranchName" Type="String" />
            <asp:Parameter Name="ContactName" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
            <asp:Parameter Name="Fax" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="StreetAddress" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="ProvinceState" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ProfileParameter Name="ClientiD" PropertyName="ClientId" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="ClientId" Type="Int32" />
            <asp:Parameter Name="StatusId" Type="Int32" />
            <asp:Parameter Name="BranchName" Type="String" />
            <asp:Parameter Name="ContactName" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
            <asp:Parameter Name="Fax" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="StreetAddress" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="ProvinceState" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>

